﻿<%@ Page Title="" Language="C#" MasterPageFile="~/ACPanel/AdminPage.master" AutoEventWireup="true" CodeFile="AddEditDiaDiem.aspx.cs" Inherits="ACPanel_NodeDiaDiem_AddEditDiaDiem" %>
<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox, Version=3.3.0.22914, Culture=neutral, PublicKeyToken=5962a4e684a48b87" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <link href="../../css/ad.style.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div class="row">
                <div class="col-lg-12">
                    <h1>
                        Thêm mới / Chỉnh sửa địa điểm</h1>
                    <ol class="breadcrumb">
                        <li><i class="fa fa-dashboard"></i> Bảng điều khiển</li>
                        <li class="active"><i class="fa fa-table"></i> Thêm mới / Chỉnh sửa địa điểm</li>
                    </ol>
                </div>
                <div class="col-lg-7">
                    <p>
                        <asp:HyperLink ID="HyperLink1" runat="server" CssClass="btn btn-danger" NavigateUrl="~/ACPanel/NodeDiaDiem/QLDiaDiem.aspx"><i class="fa fa-backward"></i> Trở về</asp:HyperLink>
                    </p>
                    <div class="form-group">
                        <p>
                            <label>Tên địa điểm </label>
                            <asp:TextBox CssClass="form-control" runat="server" ID="tbTen" placeholder="Nội dung"
                                MaxLength="100"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" SetFocusOnError="True"
                                ControlToValidate="tbTen" Display="Dynamic" ErrorMessage="(*) Chưa nhập dữ liệu"
                                ValidationGroup="groupAddUpdatePT"></asp:RequiredFieldValidator>
                        </p>                        
                        <p>
                            <label>Chọn quốc gia</label>
                            <asp:DropDownList CssClass="form-control" runat="server" ID="ddlCountry" />
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" SetFocusOnError="True"
                                ControlToValidate="ddlCountry" Display="Dynamic" ErrorMessage="(*) Chưa nhập dữ liệu"
                                ValidationGroup="groupAddUpdatePT"></asp:RequiredFieldValidator>
                        </p>
                        <p>
                            <label>Nội dung </label>
                            <FTB:FreeTextBox ID="tbNoidung" AutoParseStyles="True" Width="100%" HtmlModeCssClass="form-control"
                                ImageGalleryPath="~/Upload" ToolbarStyleConfiguration="OfficeXP" UseToolbarBackGroundImage="True"
                                ToolbarBackgroundImage="True" ToolbarLayout="ParagraphMenu,FontFacesMenu,FontSizesMenu,FontForeColorsMenu,
                            FontForeColorPicker,FontBackColorsMenu,FontBackColorPicker|Bold,Italic,Underline,Strikethrough,
                            Superscript,Subscript,RemoveFormat|JustifyLeft,JustifyRight,JustifyCenter,JustifyFull;BulletedList,
                            NumberedList,Indent,Outdent;CreateLink,Unlink,InsertImage|Cut,Copy,Paste,Delete;Undo,Redo,Print|
                            SymbolsMenu,StylesMenu,InsertHtmlMenu|InsertRule,InsertDate,InsertTime|InsertTable|InsertImageFromGallery,Preview,SelectAll"
                                runat="Server" />                            
                        </p>                        
                        <p>
                            <button type="reset" class="btn btn-default">
                                Xóa</button>
                            <asp:Button runat="server" CssClass="btn btn-primary" ID="btnThemvao" Text="Thêm vào" OnClick="btnThemvao_OnClickbtnThemvao_OnClickbtnThemvao_OnClick"/></p>
                    </div>
                </div>
                <div class="col-lg-5">
                    <asp:Literal runat="server" ID="litResult" EnableViewState="False"></asp:Literal>
                    <div class="form-group">
                        <p>
                            <label>Ảnh đại diện </label> <a href="javascript:void(0)" id="show-imgpopup">Show Image</a>
                            <asp:FileUpload CssClass="form-control" runat="server" ID="fuAnhdaidien"></asp:FileUpload>
                        </p>
                        <p>
                            <label>Tóm tắt </label>
                            <asp:TextBox CssClass="form-control" runat="server" ID="tbTomtat" placeholder="Nội dung"
                                Rows="4" TextMode="MultiLine"></asp:TextBox>                            
                        </p>
                        <p>
                            <label>Địa chỉ </label>
                            <asp:TextBox CssClass="form-control" runat="server" ID="tbDiachi" placeholder="Nội dung"
                                Rows="2" TextMode="MultiLine"></asp:TextBox>                            
                        </p>
                        <p>
                            <label>Tung độ </label>
                            <asp:TextBox CssClass="form-control" runat="server" ID="tbTungdo" placeholder="Tung độ (Lat)"
                                MaxLength="100"></asp:TextBox>                            
                        </p>
                        <p>
                            <label>Vĩ Độ </label>
                            <asp:TextBox CssClass="form-control" runat="server" ID="tbVido" placeholder="Vĩ độ (Long)"
                                MaxLength="100"></asp:TextBox>                            
                        </p>                        
                        <label>
                            Sử dụng</label>
                        <p>
                            <asp:CheckBox CssClass="form-control" runat="server" ID="cbTrangThai" ToolTip="Trạng thái sử dụng" />
                        </p>
                    </div>
                </div>
            </div>
            <div class="row">
                <div id="img-popup" class="modal fade in" tabindex="-1">
                    <div class="container">
                        <div class="row">
                            <div class="col-lg-12">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
                                </div>
                                <div class="modal-body">
                                    <article>
                                        <asp:Image runat="server" ID="imgPopup" ImageUrl="../../Upload/Diadiem/NO_IMAGE.gif" AlternateText="NO_IMAGE.gif"/>
                                    </article>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="btnThemvao"/>
        </Triggers>
    </asp:UpdatePanel>
    <script>
        $('#show-imgpopup').off('click').on('click', function() {
            $('#img-popup').modal();
        });
    </script>
</asp:Content>

